package com.yunhe.estatemanage.service;

import com.yunhe.common.exception.ArgumentErrorException;
import com.yunhe.common.model.mybatis.PageResult;
import com.yunhe.estatemanage.domain.ProcessStatus;
import com.yunhe.estatemanage.domain.ReportRepair;
import com.yunhe.estatemanage.model.ReportRepairCondition;
import com.yunhe.estatemanage.model.ReportRepairHandle;
import com.yunhe.estatemanage.model.ReportRepairStatistics;
import com.yunhe.estatemanage.model.ReportRepairView;

import java.util.List;

/**
 * @ClassName: ReportRepairService
 * @Description:
 * @author: GongDaCheng
 * @Date: 16:21 2021/9/3
 */
public interface ReportRepairService {

    /**
     * @Description 新增报事报修
     * @Param ReportRepair reportRepair
     * @Return int
     * @Date 2021/9/3 17:09
     */
    int create (ReportRepair reportRepair) throws ArgumentErrorException;

    /**
     * @Description 根据id删除报事报修
     * @Param Long id
     * @Return int
     * @Date 2021/9/3 17:10
     */
    int delete(Long id);

    /**
     * @Description 更新报事报修
     * @Param ReportRepair reportRepair
     * @Return int
     * @Date 2021/9/3 17:10
     */
    int update(ReportRepair reportRepair);

    /**
     * @Description 根据id查询报事报修
     * @Param Long id
     * @Return ReportRepair
     * @Date 2021/9/3 17:10
     */
    ReportRepair findById(Long id);

    /**
     * @Description 根据条件筛选报事报修Web
     * @Param List<Long> stationIds, ReportRepairCondition reportRepairCondition
     * @Return PageResult
     * @Date 2021/9/6 10:47
     */
    PageResult findReportRepairByConditionWeb( ReportRepairCondition reportRepairCondition);

    /**
     * @Description 根据条件筛选报事报修Mob
     * @Param ReportRepairCondition reportRepairCondition
     * @Return List<ReportRepair>
     * @Date 2021/9/7 10:28
     */
    List<ReportRepair> findReportRepairByConditionMob(ReportRepairCondition reportRepairCondition) throws ArgumentErrorException;

    /**
     * @Description 根据条件筛选报事报修Mob(分页)
     * @Param ReportRepairCondition reportRepairCondition
     * @Return PageResult
     * @Date 2021/11/18 10:10
     */
    PageResult findReportRepairByConditionMobPaging(ReportRepairCondition reportRepairCondition) throws ArgumentErrorException;

    /**
     * @Description 报事报修统计分析
     * @Param List<Long> stationIds
     * @Return ReportRepairStatistics
     * @Date 2021/9/6 17:04
     */
    ReportRepairStatistics reportRepairStatistics(List<Long> stationIds);

    /**
     * @Description 分派事项
     * @Param Long id, Long distributeOrgId, Long distributePersonId
     * @Return
     * @Date 2021/9/6 15:42
     */
    void distributeReportRepair(Long id, Long distributeOrgId, Long distributePersonId) throws ArgumentErrorException;

    /**
     * @Description 催办事项
     * @Param Long id
     * @Return
     * @Date 2021/9/7 11:03
     */
    void urgeReportRepair(Long id);

    /**
     * @Description 查看报事报修事项
     * @Param Long id
     * @Return ReportRepairView
     * @Date 2021/9/7 9:13
     * @return
     */
    ReportRepair viewReportRepair(Long id);

    /**
     * @Description 处理报事报修事项
     * @Param ReportRepairHandle reportRepairHandle
     * @Return
     * @Date 2021/9/7 14:25
     */
    void handleReportRepair(ReportRepairHandle reportRepairHandle) throws ArgumentErrorException;

    /**
     * @Description 获取历史处理反馈
     * @Param Long id
     * @Return List<ProcessStatus>
     * @Date 2021/9/7 16:08
     */
    List<ProcessStatus> getFeedbackHistory(Long id);

    /**
     * @Description 查看节点历史信息
     * @Param Long id
     * @Return List<ProcessStatus>
     * @Date 2021/9/9 14:32
     */
    List<ProcessStatus> getNodeHistory(Long id);

    /**
     * @Description 撤销事项
     * @Param Long id
     * @Return
     * @Date 2021/9/8 15:52
     */
    void revokeReportRepair(Long id) throws ArgumentErrorException;

    List<ProcessStatus> getProcessList(Long id);

    ReportRepairView test(Long id);
}
